package com.leiduoduo.oms.service;

import com.leiduoduo.oms.dao.OrderDishDao;
import com.leiduoduo.oms.pojo.OrderDish;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;

@Service
public class OrderDishServiceImpl implements OrderDishService {
    @Autowired
    OrderDishDao orderDishDao;
    @Override
    public boolean addOrderDish(OrderDish orderDish) {
        orderDish.setCreated_at(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
        return orderDishDao.addOrderDish(orderDish);
    }
}
